<?php
class logout extends Controller {

	function logout() {
		parent::Controller();
		
		$this->load->library('session');
		$this->load->helper('url');
	}
	
	function index() {
		$newdata = array(
					'id'  => null, 
					'name'  => null, 
					'email'     => null, 
					'group'   => null, 
					'logged_in' => FALSE
				);
		$this->session->set_userdata($newdata);
		
		redirect('/', 'refresh');
	}
}